/**
 * 
 */
package com.gwcloud.leetcode.interview100;

import com.gwcloud.leetcode.common.datastructure.ListNode;

/**
 * @ClassName   : Leetcode0328 
 * @author      : ganwei 
 * @date        : 2020年5月30日
 * @Description : Leetcode0328 奇偶链表
 */
public class Leetcode0328 {
	/**
	 * -解题思路，
	 */
    public ListNode oddEvenList(ListNode head) {
        if (head == null) return null;
        ListNode odd = head, even = head.next, evenHead = even;
        while (even != null && even.next != null) {
            odd.next = even.next;
            odd = odd.next;
            even.next = odd.next;
            even = even.next;
        }
        odd.next = evenHead;
        return head;

    }
    /**
     * -主函数
     */
    public static void main(String[] args){
    	
    }
}
